package org.lyq.erp.process.userrank.pojo;

import java.math.BigDecimal;
import org.lyq.erp.config.exception.errorbasics.ErrorMessageBasics;
import org.lyq.erp.process.buyfulltemp.pojo.TblWxBuyfullTemplate;
import org.lyq.erp.utils.format.FormatUtils;

public class TblWxUserrank extends ErrorMessageBasics {

	private Integer rankId;

	private String rankName;

	private Integer rankStatus;

	private String rankCode;

	private Double rankDiscount;

	private BigDecimal rankAmtNum;

	private Integer rankIstype;

	private Integer rankBuyfullId;

	private TblWxBuyfullTemplate buyFullTemp;

	private Integer isExceed;

	private Long rankDiscntStatime;

	private Long rankDiscntEndtime;

	private Long rankUpdatetime;

	private Long rankCreatetime;

	private String rankDiscntStatimeView;

	private String rankDiscntEndtimeView;

	private String rankUpdatetimeView;

	private String rankCreatetimeView;

	public Long getRankDiscntStatime() {
		return this.rankDiscntStatime;
	}

	public void setRankDiscntStatime(Long rankDiscntStatime) {
		if (rankDiscntStatime != null)
			this.rankDiscntStatimeView = FormatUtils.getFormatDate(rankDiscntStatime);
		this.rankDiscntStatime = rankDiscntStatime;
	}

	public Long getRankUpdatetime() {
		return this.rankUpdatetime;
	}

	public void setRankUpdatetime(Long rankUpdatetime) {
		if (rankUpdatetime != null)
			this.rankUpdatetimeView = FormatUtils.getFormatDate(rankUpdatetime);
		this.rankUpdatetime = rankUpdatetime;
	}

	public Long getRankCreatetime() {
		return this.rankCreatetime;
	}

	public void setRankCreatetime(Long rankCreatetime) {
		if (rankCreatetime != null)
			this.rankCreatetimeView = FormatUtils.getFormatDate(rankCreatetime);
		this.rankCreatetime = rankCreatetime;
	}

	public Long getRankDiscntEndtime() {
		return this.rankDiscntEndtime;
	}

	public void setRankDiscntEndtime(Long rankDiscntEndtime) {
		if (rankDiscntEndtime != null) {
			if (System.currentTimeMillis() >= rankDiscntEndtime.longValue()) {
				this.isExceed = Integer.valueOf(-1);
			} else {
				this.isExceed = Integer.valueOf(1);
			}
			this.rankDiscntEndtimeView = FormatUtils.getFormatDate(rankDiscntEndtime);
		}
		this.rankDiscntEndtime = rankDiscntEndtime;
	}

	public Integer getIsExceed() {
		return this.isExceed;
	}

	public String getRankDiscntStatimeView() {
		return this.rankDiscntStatimeView;
	}

	public void setRankDiscntStatimeView(String rankDiscntStatimeView) {
		this.rankDiscntStatimeView = rankDiscntStatimeView;
	}

	public String getRankDiscntEndtimeView() {
		return this.rankDiscntEndtimeView;
	}

	public void setRankDiscntEndtimeView(String rankDiscntEndtimeView) {
		this.rankDiscntEndtimeView = rankDiscntEndtimeView;
	}

	public String getRankUpdatetimeView() {
		return this.rankUpdatetimeView;
	}

	public void setRankUpdatetimeView(String rankUpdatetimeView) {
		this.rankUpdatetimeView = rankUpdatetimeView;
	}

	public String getRankCreatetimeView() {
		return this.rankCreatetimeView;
	}

	public void setRankCreatetimeView(String rankCreatetimeView) {
		this.rankCreatetimeView = rankCreatetimeView;
	}

	public void setIsExceed(Integer isExceed) {
		this.isExceed = isExceed;
	}

	public TblWxBuyfullTemplate getBuyFullTemp() {
		return this.buyFullTemp;
	}

	public void setBuyFullTemp(TblWxBuyfullTemplate buyFullTemp) {
		this.buyFullTemp = buyFullTemp;
	}

	public Integer getRankId() {
		return this.rankId;
	}

	public void setRankId(Integer rankId) {
		this.rankId = rankId;
	}

	public String getRankName() {
		return this.rankName;
	}

	public void setRankName(String rankName) {
		this.rankName = (rankName == null) ? null : rankName.trim();
	}

	public Integer getRankStatus() {
		return this.rankStatus;
	}

	public void setRankStatus(Integer rankStatus) {
		this.rankStatus = rankStatus;
	}

	public String getRankCode() {
		return this.rankCode;
	}

	public void setRankCode(String rankCode) {
		this.rankCode = (rankCode == null) ? null : rankCode.trim();
	}

	public Double getRankDiscount() {
		return this.rankDiscount;
	}

	public void setRankDiscount(Double rankDiscount) {
		this.rankDiscount = rankDiscount;
	}

	public BigDecimal getRankAmtNum() {
		return this.rankAmtNum;
	}

	public void setRankAmtNum(BigDecimal rankAmtNum) {
		this.rankAmtNum = rankAmtNum;
	}

	public Integer getRankIstype() {
		return this.rankIstype;
	}

	public void setRankIstype(Integer rankIstype) {
		this.rankIstype = rankIstype;
	}

	public Integer getRankBuyfullId() {
		return this.rankBuyfullId;
	}

	public void setRankBuyfullId(Integer rankBuyfullId) {
		this.rankBuyfullId = rankBuyfullId;
	}
}
